package com.hyx.bookManager.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @ClassName StaticFileConfig
 * @Description TODO
 * @Author 黄乙轩
 * @Date 2021/6/18 20:35
 * @Version 1.0
 **/

@Configuration
public class StaticFileConfig implements WebMvcConfigurer {
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry){
        registry.addResourceHandler("/img/**").addResourceLocations("file:F:/项目/bookManagerImg/");
        registry.addResourceHandler("/monitor/**").addResourceLocations("file:F:/项目/monitorImg/");
    }
}
